Optimal. Leaf size=180 \[ \frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (-c x+i)}-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (-c x+i)^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{3 b^2}{16 c d^3 (-c x+i)}+\frac{i b^2}{16 c d^3 (-c x+i)^2}-\frac{3 b^2 \tan ^{-1}(c x)}{16 c d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17955, antiderivative size = 180, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {4864, 4862, 627, 44, 203, 4884} \[ \frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (-c x+i)}-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (-c x+i)^2}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{3 b^2}{16 c d^3 (-c x+i)}+\frac{i b^2}{16 c d^3 (-c x+i)^2}-\frac{3 b^2 \tan ^{-1}(c x)}{16 c d^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4864
Rule 4862
Rule 627
Rule 44
Rule 203
Rule 4884
Rubi steps
\begin{align*} \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{(d+i c d x)^3} \, dx &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}-\frac{(i b) \int \left (\frac{i \left (a+b \tan ^{-1}(c x)\right )}{2 d^2 (-i+c x)^3}-\frac{a+b \tan ^{-1}(c x)}{4 d^2 (-i+c x)^2}+\frac{a+b \tan ^{-1}(c x)}{4 d^2 \left (1+c^2 x^2\right )}\right ) \, dx}{d}\\ &=\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}+\frac{(i b) \int \frac{a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{4 d^3}-\frac{(i b) \int \frac{a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{4 d^3}+\frac{b \int \frac{a+b \tan ^{-1}(c x)}{(-i+c x)^3} \, dx}{2 d^3}\\ &=-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)^2}+\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}+\frac{\left (i b^2\right ) \int \frac{1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{4 d^3}+\frac{b^2 \int \frac{1}{(-i+c x)^2 \left (1+c^2 x^2\right )} \, dx}{4 d^3}\\ &=-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)^2}+\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}+\frac{\left (i b^2\right ) \int \frac{1}{(-i+c x)^2 (i+c x)} \, dx}{4 d^3}+\frac{b^2 \int \frac{1}{(-i+c x)^3 (i+c x)} \, dx}{4 d^3}\\ &=-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)^2}+\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}+\frac{\left (i b^2\right ) \int \left (-\frac{i}{2 (-i+c x)^2}+\frac{i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{4 d^3}+\frac{b^2 \int \left (-\frac{i}{2 (-i+c x)^3}+\frac{1}{4 (-i+c x)^2}-\frac{1}{4 \left (1+c^2 x^2\right )}\right ) \, dx}{4 d^3}\\ &=\frac{i b^2}{16 c d^3 (i-c x)^2}+\frac{3 b^2}{16 c d^3 (i-c x)}-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)^2}+\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}-\frac{b^2 \int \frac{1}{1+c^2 x^2} \, dx}{16 d^3}-\frac{b^2 \int \frac{1}{1+c^2 x^2} \, dx}{8 d^3}\\ &=\frac{i b^2}{16 c d^3 (i-c x)^2}+\frac{3 b^2}{16 c d^3 (i-c x)}-\frac{3 b^2 \tan ^{-1}(c x)}{16 c d^3}-\frac{b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)^2}+\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c d^3 (i-c x)}-\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{8 c d^3}+\frac{i \left (a+b \tan ^{-1}(c x)\right )^2}{2 c d^3 (1+i c x)^2}\\ \end{align*}
Mathematica [A] time = 0.178431, size = 110, normalized size = 0.61 \[ -\frac{i \left (8 a^2+4 a b (c x-2 i)+b (c x+i) \tan ^{-1}(c x) (4 a (c x-3 i)+b (-5-3 i c x))+2 b^2 \left (c^2 x^2-2 i c x+3\right ) \tan ^{-1}(c x)^2+b^2 (-4-3 i c x)\right )}{16 c d^3 (c x-i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.072, size = 405, normalized size = 2.3 \begin{align*}{\frac{{\frac{i}{16}}{b}^{2}\ln \left ( -{\frac{i}{2}} \left ( -cx+i \right ) \right ) \ln \left ( cx+i \right ) }{c{d}^{3}}}-{\frac{{\frac{i}{32}}{b}^{2} \left ( \ln \left ( cx-i \right ) \right ) ^{2}}{c{d}^{3}}}-{\frac{{b}^{2}\arctan \left ( cx \right ) \ln \left ( cx-i \right ) }{8\,c{d}^{3}}}-{\frac{{b}^{2}\arctan \left ( cx \right ) }{4\,c{d}^{3} \left ( cx-i \right ) ^{2}}}+{\frac{{\frac{i}{2}}{a}^{2}}{c{d}^{3} \left ( 1+icx \right ) ^{2}}}+{\frac{{b}^{2}\arctan \left ( cx \right ) \ln \left ( cx+i \right ) }{8\,c{d}^{3}}}+{\frac{iab\arctan \left ( cx \right ) }{c{d}^{3} \left ( 1+icx \right ) ^{2}}}-{\frac{{\frac{i}{16}}{b}^{2}\ln \left ( -{\frac{i}{2}} \left ( -cx+i \right ) \right ) \ln \left ( -{\frac{i}{2}} \left ( cx+i \right ) \right ) }{c{d}^{3}}}-{\frac{{\frac{i}{4}}ab}{c{d}^{3} \left ( cx-i \right ) }}-{\frac{3\,{b}^{2}}{16\,c{d}^{3} \left ( cx-i \right ) }}-{\frac{{\frac{i}{4}}ab\arctan \left ( cx \right ) }{c{d}^{3}}}-{\frac{3\,{b}^{2}\arctan \left ( cx \right ) }{16\,c{d}^{3}}}+{\frac{{\frac{i}{16}}{b}^{2}}{c{d}^{3} \left ( cx-i \right ) ^{2}}}-{\frac{{\frac{i}{32}}{b}^{2} \left ( \ln \left ( cx+i \right ) \right ) ^{2}}{c{d}^{3}}}+{\frac{{\frac{i}{16}}{b}^{2}\ln \left ( cx-i \right ) \ln \left ( -{\frac{i}{2}} \left ( cx+i \right ) \right ) }{c{d}^{3}}}-{\frac{{\frac{i}{4}}{b}^{2}\arctan \left ( cx \right ) }{c{d}^{3} \left ( cx-i \right ) }}-{\frac{ab}{4\,c{d}^{3} \left ( cx-i \right ) ^{2}}}+{\frac{{\frac{i}{2}}{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{c{d}^{3} \left ( 1+icx \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.17536, size = 182, normalized size = 1.01 \begin{align*} -\frac{{\left (4 i \, a b + 3 \, b^{2}\right )} c x +{\left (2 i \, b^{2} c^{2} x^{2} + 4 \, b^{2} c x + 6 i \, b^{2}\right )} \arctan \left (c x\right )^{2} + 8 i \, a^{2} + 8 \, a b - 4 i \, b^{2} +{\left ({\left (4 i \, a b + 3 \, b^{2}\right )} c^{2} x^{2} +{\left (8 \, a b - 2 i \, b^{2}\right )} c x + 12 i \, a b + 5 \, b^{2}\right )} \arctan \left (c x\right )}{16 \, c^{3} d^{3} x^{2} - 32 i \, c^{2} d^{3} x - 16 \, c d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.35746, size = 363, normalized size = 2.02 \begin{align*} \frac{{\left (-8 i \, a b - 6 \, b^{2}\right )} c x +{\left (i \, b^{2} c^{2} x^{2} + 2 \, b^{2} c x + 3 i \, b^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )^{2} - 16 i \, a^{2} - 16 \, a b + 8 i \, b^{2} +{\left ({\left (4 \, a b - 3 i \, b^{2}\right )} c^{2} x^{2} +{\left (-8 i \, a b - 2 \, b^{2}\right )} c x + 12 \, a b - 5 i \, b^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{32 \, c^{3} d^{3} x^{2} - 64 i \, c^{2} d^{3} x - 32 \, c d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (i \, c d x + d\right )}^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]